package com.hlf.modules.merchant.coupon.mapper;

import com.hlf.modules.merchant.coupon.entity.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CouponMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    Coupon selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    /**
     * 优惠券列表
     * @param storeId
     * @return
     */
    List<Coupon> queryListByStoreId(@Param("storeId") Long storeId);

    /**
     * 根据门店id修改
     * @param record
     * @return
     */
    int updateByStoreIdSelective(Coupon record);
}